//
//  THJHistoryDataCell.m
//  THJXHW
//
//  Created by 河南德艺 on 2017/11/18.
//  Copyright © 2017年 河南德艺. All rights reserved.
//

#import "THJHistoryDataCell.h"

@implementation THJHistoryDataCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setContentWithDic:(NSDictionary*)dic{
    self.dateLab.text = dic[@"updateTime"];
    self.priceLab.text = dic[@"price"];
    NSInteger rate = [dic[@"change_n"] integerValue];
    self.rateLab.text = [NSString stringWithFormat:@"%ld" , rate];
    if(rate>0){
        self.priceLab.textColor = COLOR(247, 8, 6, 1);
        self.rateLab.textColor = COLOR(247, 8, 6, 1);
    }else if(rate == 0){
        self.priceLab.textColor = SingleColor(lightGrayColor);
         self.rateLab.textColor = SingleColor(lightGrayColor);
    }else{
        self.priceLab.textColor = COLOR(80, 175, 65, 1);
        self.rateLab.textColor = COLOR(80, 175, 65, 1);
    }
}
@end
